home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / contrib / zelk / src-zelk / build next >
Encoding:
Text File  |  1992-11-12  |  1.7 KB  |  74 lines

  1. . ../../../config/system
  2. . ../../../config/site
  3.  
  4. echo Building Makefile.local...
  5. cat <<EOT >Makefile.local
  6. # This Makefile was produced by running ./build in this directory.
  7.  
  8. SHELL=        /bin/sh
  9.  
  10. CC=        ${cc-cc}
  11. CFLAGS=        $cflags
  12. LINTFLAGS=    $lintflags
  13.  
  14. INC=        $elktop/include
  15. H=        zelk.h
  16.  
  17. O=        forfunc.o fortest.o farray.o peekpoke.o forpkg.o zelk.o \
  18.         $fvector $asm $alibs
  19.  
  20. ZELK:        ../Zelk.o
  21.  
  22. ../Zelk.o:    \$(O)
  23.         ld -r \$(O) -o ../Zelk.o
  24.  
  25. #### special case compiles ####
  26.  
  27. MIPSASM.o:    MIPSASM.s
  28.         as -O -g -G0 $(CFLAGS) MIPSASM.s -o MIPSASM.o
  29.  
  30. # forfunc on sparc MUST NOT be compiled -O, since this interferes
  31. # with the asm() statements.  Use -g to override the -O
  32. forfunc.o:    forfunc.c
  33.         \$(CC) -g \$(CFLAGS) -I\$(INC) -c forfunc.c
  34.  
  35. ## fvector.c needs ANSI C macros
  36.  
  37. # this target - do not try to compile fvector
  38. fvectornone.o:
  39.         \$(CC) -c fvector_empty.c -o fvectornone.o
  40.  
  41. # compile fvector.c using SGI compiler
  42. fvectorsgi.o:    fvector.c
  43.         \$(CC) -DSgiAnsi -prototypes -float -G0 \$(CFLAGS)\
  44.         -I\$(INC) -c fvector.c -o fvectorsgi.o
  45.  
  46. # compile fvector.c using gcc
  47. # gcc by default uses its own include files from .../lib/gcc/sun
  48. # The assert.h there calls _eprintf, which is in /usr/... /gcclib.a.
  49. # To avoid linking with this, specify -nostdinc.
  50. fvectorgcc.o:    fvector.c
  51.         gcc -g -O2 -DEgcc \$(CFLAGS) $fvectorflags \
  52.         -fpcc-struct-return -I\$(INC) -c fvector.c -o fvectorgcc.o
  53.  
  54.  
  55. ## forgl exports some of the SGI Gl graphics library
  56. # needs ANSI compiler
  57. # cannot use $CFLAGS because cflags specifies -cckr
  58. forgl.o:    forgl.c
  59.         \$(CC) -DSgiAnsi -prototypes -float -g -G0 \$(CFLAGS) \
  60.         -I\$(INC) -c forgl.c
  61.  
  62.  
  63. .c.o:
  64.         \$(CC) \$(CFLAGS) $floatflag -I\$(INC) -c \$<
  65.  
  66. \$(O):        \$(H)
  67.  
  68. clean:
  69.         -rm -f *.o core Makefile.local
  70.  
  71. distclean:
  72.         -rm -f *.o core Makefile.local
  73. EOT
  74.